import { computed } from 'vue'

export function useUser(store) {
    const addCount = () => {
        store.dispatch('user/addCount', 1)
    }

    return {
        count: computed(() => store.state.user.count),
        doubleCount: computed(() => store.getters['user/doubleCount']),
        addCount
    }
}
